package com.example.administrator.myapplication;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Created by Administrator on 2018/1/3.
 */

public class AlarmNote extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String messageTitle = intent.getStringExtra("messageTitle");
        String messageContent = intent.getStringExtra("messageContent");
        Intent intent1 = new Intent();
        intent1.setClass(context,Alarm.class);
        intent1.putExtra("messageTitle",messageTitle);
        intent1.putExtra("messageContent",messageContent);
        intent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//创建一个新的栈,
        context.startActivity(intent1);
    }
}
